const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const CatagorySchema = new Schema({
	title:{
		type:String,
		required:true
	},
	blog_num:{
		type:Number,
		default:0
	},
	view:{
		type:Number,
		default:0
	},
	like:{
		type:Number,
		default:0
	},
	create_time:{  //日期
		type:Date,
		default:Date.now()
	},
	update_time:{  //日期
		type:Date,
		default:Date.now()
	},
})

module.exports = Catagory = mongoose.model('Catagory',CatagorySchema);
